import React from 'react'
import { useLocation } from 'react-router-dom'
import style from './petdetail.module.css'
let { main, title, contents, date, create_time } = style
export default function Detail() {
  let location = useLocation()
  console.log(location)
  return (
    <div className={main}>
      <span className={title}>{location.state.title}</span>
      <p className={contents}>{location.state.contents}</p>
      <img src={location.state.imgUrl} alt="" />
      <span className={date}>{location.state.date}</span>
    </div>
  )
}
